cmake_minimum_required(VERSION 3.0.2)
project(lib_client)
add_compile_options(-std=c++11)

#find_package(catkin REQUIRED COMPONENTS
#  roscpp
#  rospy
#  std_msgs
#)



find_package(OpenCV REQUIRED)
include_directories(${OpenCV_INCLUDE_DIRS})
link_directories(${OpenCV_LIBRARY_DIRS})

#include more
include_directories(${PROJECT_SOURCE_DIR}/include/tcpclient/)


set(LIB_DIR ${PROJECT_SOURCE_DIR}/lib)
link_directories(${LIB_DIR})

SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -pthread")

#include src
add_library(client
    SHARED
    src/tcp_client.cpp
    src/generater.cpp
    src/config.cpp
    #src/picture2string.cpp
    #src/main.cpp 
)

target_link_libraries(client
  #${catkin_LIBRARIES}
  #${JSONCPP_LIBRARIES}
  ${OpenCV_LIBS}
  libjsoncpp.so
  #libjsoncpp.a
  #${OpenCV_LIBRARIES}  
	#PlayCtrl
)


add_executable(client_to_try
    src/main.cpp
    src/tcp_client.cpp
    src/generater.cpp
    src/config.cpp 
)

target_link_libraries(client_to_try
  ${OpenCV_LIBS}
  libjsoncpp.so
)
